import { createRouter, createWebHistory } from 'vue-router'

import Kitchen from '@/views/kitchen/index.vue'
import Recipe from '@/views/recipe/index.vue'
import Cook from '@/views/cook/index.vue'
import Me from '@/views/me/index.vue'

const routes = [
  {
    path: '/',
    name: 'kitchen',
    component: Kitchen,
  },
  {
    path: '/recipe',
    name: 'recipe',
    component: Recipe,
  },
  {
    path: '/cook',
    name: 'cook',
    component: Cook,
  },
  {
    path: '/me',
    name: 'me',
    component: Me,
  },
]

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL), // 历史模式（无 # 号）
  routes, // 路由规则
})

export default router
